package test.db.mysql.table;

public enum ExaminationQuestionAnswerTable implements Table {
    SID(Column.sid),
    ANSWER(Column.answer),
    STATE(Column.state),
    EXAMINATION_QUESTION_SID(Column.examinationQuestionSid),
    ANSWER_PAPER_SID(Column.answerPaperSid);
    
    private final Column column;
    private static final String TYPE_SID = "VARCHAR(20)";
    private static final String TYPE_ANSWER = "TEXT";
    private static final String TYPE_STATE = "VARCHAR(12)";
    private static final String TYPE_EXAMINATION_QUESTION_SID = "VARCHAR(20)";
    private static final String TYPE_ANSWER_PAPER_SID = "VARCHAR(20)";

    ExaminationQuestionAnswerTable(Column column) {
        this.column = column;
    }
    
    private enum Column {
        sid {
            String getType() {
                return TYPE_SID;
            }
        },
        
        answer {
            String getType() {
                return TYPE_ANSWER;
            }
        },
        
        state {
        	String getType() {
        		return TYPE_STATE;
        	}
        },
        
        examinationQuestionSid {
            String getType() {
                return TYPE_EXAMINATION_QUESTION_SID;
            }
        },
        
        answerPaperSid {
            String getType() {
                return TYPE_ANSWER_PAPER_SID;
            }
        };
        
        abstract String getType();
    }
    
    public String getType() {
        return column.getType();
    }
    
    public void initData() throws Exception {
        System.out.println("CALL NOW");
    }
}
